/*    */ package com.lmpop.createIndex.search;
/*    */ 
/*    */ import com.lmpop.createIndex.searchModel.SearchData;
/*    */ import com.lmpop.createIndex.searchModel.SearchModel;
/*    */ import java.io.IOException;
/*    */ import java.util.ArrayList;
/*    */ import java.util.Hashtable;
/*    */ import java.util.List;
/*    */ import java.util.Map;
/*    */ 
/*    */ public class AuctionviewIndexFiles
/*    */ {
/*    */   public ProperUtil properUtil;
/*    */   private String file_path;
/*    */ 
/*    */   public AuctionviewIndexFiles()
/*    */   {
/* 17 */     this.properUtil = new ProperUtil();
/* 18 */     this.file_path = this.properUtil.getFilePathByModel("auctionlog");
/*    */   }
/*    */ 
/*    */   public List getAuctionviewList(Map paraMap)
/*    */     throws IOException
/*    */   {
/* 24 */     ArrayList auctionviewList = new ArrayList();
/* 25 */     SearchData search = new SearchData();
/* 26 */     ArrayList paraList = new ArrayList();
/*    */ 
/* 28 */     String auction_id = "";
/* 29 */     if (paraMap.get("auction_id") != null) auction_id = paraMap.get("auction_id").toString();
/*    */ 
/* 33 */     paraList.add(new SearchModel("0", "auction_id", auction_id));
/*    */ 
/* 36 */     auctionviewList = search.getSearchInfo(this.file_path, paraList);
/* 37 */     return auctionviewList;
/*    */   }
/*    */ 
/*    */   public String getMaxBidPrice(List list)
/*    */   {
/* 42 */     String bid_price = "0"; String comp_bid_price1 = ""; String comp_bid_price2 = "";
/* 43 */     Hashtable map = new Hashtable();
/* 44 */     Hashtable map2 = new Hashtable();
/*    */ 
/* 46 */     if ((list != null) && (list.size() > 0)) {
/* 47 */       Hashtable map3 = (Hashtable)list.get(0);
/* 48 */       if (map3.get("bid_price") != null) {
/* 49 */         bid_price = map3.get("bid_price").toString();
/*    */       }
/* 51 */       for (int i = 0; i < list.size(); i++) {
/* 52 */         map = (Hashtable)list.get(i);
/* 53 */         if (i < list.size() - 1) {
/* 54 */           map2 = (Hashtable)list.get(i + 1);
/*    */         }
/* 56 */         if (map.get("bid_price") != null) {
/* 57 */           comp_bid_price1 = map.get("bid_price").toString();
/*    */         }
/* 59 */         if (map2.get("bid_price") != null) {
/* 60 */           comp_bid_price2 = map2.get("bid_price").toString();
/*    */         }
/* 62 */         if ((comp_bid_price2.equals("")) || (comp_bid_price1.equals("")) || 
/* 63 */           (Float.valueOf(comp_bid_price2).floatValue() < Float.valueOf(comp_bid_price1).floatValue())) continue;
/* 64 */         bid_price = comp_bid_price2;
/*    */       }
/*    */ 
/*    */     }
/*    */ 
/* 70 */     return bid_price;
/*    */   }
/*    */ }

/* Location:           F:\电商\commons-utils.jar
 * Qualified Name:     com.lmpop.createIndex.search.AuctionviewIndexFiles
 * JD-Core Version:    0.6.0
 */